#!/bin/bash
# vim: et ts=4 sw=4
dir=`pwd`
sudo apt-get install -y language-pack-zh-hans
sudo locale-gen zh_CN.UTF-8
sudo apt-get install -y python python-dev
sudo apt-get install -y build-essential libssl-dev libevent-dev libjpeg-dev libxml2-dev libxslt-dev
sudo apt-get install -y ctags cscope
sudo python get-pip.py

host=https://pypi.tuna.tsinghua.edu.cn/simple
sudo pip install virtualenv -i $host
sudo pip install virtualenvwrapper -i $host
sudo pip install jedi -i $host

git clone https://git.oschina.net/coderxiaojian/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
sudo make install
sudo make deps
source ~/.bashrc
source ~/.profile

if [ ! -d ~/.vim/colors ]; then                                                                                                                                                                
    mkdir -p ~/.vim/colors                                                                                                                                                                        
fi;                                                                                                                                                                                            
cp -f $dir/molokai.vim ~/.vim/colors

git config --global core.pager "less -r"
echo 'Done!'
